package com.details.app.Service.Impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.details.app.Mapper.ReviewMapper;
import com.details.app.Service.ReviewService;
import com.tamll.bean.Review;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@Service
public class ReviewServiceImpl implements ReviewService {

    @Autowired
    private ReviewMapper reviewMapper;

    @Override
    public List<Review> selectReviewProductId(Integer productId) {
        QueryWrapper<Review> queryWrapper=new QueryWrapper<>();
        queryWrapper.eq("review_product_id",productId);
        List<Review> reviews = reviewMapper.selectList(queryWrapper);
        return reviews;
    }

}
